package cn.teamwork.ssm.controller;

import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class IndexController {
    @RequestMapping("")
    public ModelAndView index(String target){
        ModelAndView view=new ModelAndView("index");
        if(StringUtils.isEmpty(target)){
            target="welcome";
        }
        view.addObject("t",target+".jsp");
        return view;
    }
}

